/**
 @tce
 代码说明： 传感器管理的各个功能请求
 创建时间：2024.9.9       开发者：lizhicheng
 使用项目：zhongguanghe   代码版本：V1.0
 */

// api/sensorManagement.js
import http from "../utils/http/http";

// 获取传感器数据
const getSensors = (data) => {
    return http.get("/sensors/", data);
};


// 查传感器信息表总记录数,好像没用上
const countSensorsInfoData = () => {
    return http.get("/sensors/total");
};

// 添加传感器数据
const addSensors = (data) => {
    return http.post("/sensors/addSensors", data);
};

// 删除传感器数据
const deleteSensor = (sensCode) => {
    return http.del(`/sensors/deleteSensor/${sensCode}`);
};

// 获取传感器类型
const getSensorModels = () => {
    return http.get("/sensors/sensModels");
};

// 修改传感器信息
const updateSensor = (sensCode, data) => {
    return http.put(`/sensors/updateSensor/${sensCode}`, data);
};



export default {
    getSensors,
    countSensorsInfoData,
    addSensors,
    deleteSensor,
    getSensorModels,
    updateSensor,
    // getSensorById,
    // updateSensor,
};
